/**
 *
 * Copyright 2017 Google Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: #333;
}

.expando {
  border-radius: 2px;
  overflow: hidden;
  position: fixed;
  top: 20px;
  left: 20px;
  will-change: transform;
}

.expando__inner {
  top: 10px;
  left: 10px;
  border-radius: 50%;
  overflow: hidden;
  background: #FFF;
  position: absolute;
  will-change: transform;
}

.expando__inner-inverter {
  will-change: transform;
}

.expando__btn {
  width: 48px;
  height: 48px;
  position: absolute;
  top: 0;
  left: 0;
  background: none;
  border: none;
  outline: none;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
  transition:
      transform 0.1s cubic-bezier(0, 0, 0.31, 1),
      opacity 0.2s cubic-bezier(0, 0, 0.31, 1);
}

.expando__content {
  position: absolute;
  left: -10px;
  top: -10px;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transform: translateY(20px);
  transition:
      transform 0.3s cubic-bezier(0, 0, 0.31, 1),
      opacity 0.3s cubic-bezier(0, 0, 0.31, 1);
}

.expando__close {
  position: absolute;
  right: 10px;
  top: 10px;
  outline: none;
  border: none;
  background: none;
  cursor: pointer;
}

.expando__content-list {
  width: 140px;
  margin: 0;
  padding: 30px 0 20px 0;
  list-style: none;
  overflow: hidden;
}

li {
  line-height: 1.9;
  padding: 0 20px;
}

li:hover {
  background: #555;
  color: #FFF;
}

.item--expanded {
  animation-name: expandAnimation;
  animation-duration: 0.7s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.item__contents--expanded {
  animation-name: expandContentsAnimation;
  animation-duration: 0.7s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.item--collapsed {
  animation-name: collapseAnimation;
  animation-duration: 0.2s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.item__contents--collapsed {
  animation-name: collapseContentsAnimation;
  animation-duration: 0.2s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.item__contents--expanded .expando__content {
  transform: translateY(0px);
  opacity: 1;
  pointer-events: auto;
}

.item__contents--expanded .expando__btn {
  transform: rotate(180deg);
  opacity: 0;
  pointer-events: none;
}
